filePath='/home/tzp/linshirenwu/panel/Panel-PanelPool-MB_Region-000000000000000000000008-top100.new_PanelMeta-newchina123.subtractOccupation.newAge_20151126134950'
out_path='/home/tzp/linshirenwu/panel/Extract_MB_1W'
in_f=File.open(filePath, 'r:UTF-8')
out_f=File.open(out_path, 'w:UTF-8')
count=0
sep=-1
r0=(0...6)
r1=(8...34)
in_f.each do |line|
  line_s=line.to_s
  if line_s.index 'fake'
    puts 'find a fake'
  else
    sep=sep+1
    if sep%100 == 0
      count=count+1
      lsp=line_s.split ','
      out=''
      lsp[r0].each { |field| out=out+field+',' }
      lsp[r1].each { |field| out=out+field+',' }
      puts out[0...-1]
      out_f.write out[0...-1]
      out_f.write "\n"
    end
    if count == 10001
      break
    end
  end
end